/*
 * @Author: 余文童
 * @Date: 2020-08-10 10:53:10
 * @LastEditTime: 2020-08-13 01:35:21
 * @LastEditors: 余文童
 * @Description: 响应结果实体类
 * @FilePath: \BackEnd\saleflower\src\main\java\com\wangwang\saleflower\entity\ResultState.java
 */
package com.wangwang.saleflower.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class ResultState {

    public enum State {
        ERROR,
        SUCCESS,
    }

    private State state;
    private Object data;
    private String message;

    public static ResultState CreateResult(State state, Object data, String msg) {
        return new ResultState(state, data, msg);
    }
}